<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1">
<title>Insert title here</title>
<link rel="stylesheet" href="../css/home.css">
<link rel="stylesheet" href="../css/jquery.mobile.structure-1.2.0.css" />
<link rel="stylesheet" href="../css/jquery.mobile-1.2.0.css" />

<script type="text/javascript" charset="utf-8" src="../javascript/jquery-1.6.2.js"></script>
<script type="text/javascript" charset="utf-8" src="../javascript/jquery.mobile-1.2.0.js"></script>


</head>

<body>

<div id="join_page" data-role="page">

<script>


function joinCheck(userid, userpw, username){
	if(userid == "" || userpw =="" || username==""){
		if(username == ""){
			alert("이름을 입력하세요");
			$("#username").focus();
		}else if(userid == ""){
			alert("ID를 입력하세요");
			$("#userid").focus();
		}else if(userpw == ""){
			alert("패스워드를 입력하세요");
			$("#userpw").focus();
		} 
	}
	else{
		$("#join_form").submit();
	}
}

function join()
{
	
	var userid = $("#userid").val();
	var userpw = $("#userpw").val();
	var username = $("#username").val();
	
	joinCheck(userid, userpw, username);
	
	
}



$('#make_bt').live('click', function() {
	  // Live handler called.
	join();
});




</script>

<header data-role="header" data-theme="a">
<a href="http://210.118.74.126:8080/hackaton/" id="back_bt" class="ui-btn-left" data-theme="c"  data-role="button" data-icon="home">Home</a>
		<h1 id=headd>Join</h1>
</header>


<article>
<div data-role="content">
<div id="vacancy1">　　　　</div>
<center>회원가입
<div id="vacancy2">　　</div>
<form method="post" action="../JoinServlet" id="join_form" data-ajax="false">

<input type="text" class="user" id="username" name="username" placeholder="이름을 입력하세요" data-inline="true"/>
<input type="text" class="user" id="userid" name="userid" placeholder="아이디를 입력하세요" data-inline="true"/>
<input type="password" class="user" id="userpw" name="userpw" placeholder="패스워드을 입력하세요" data-inline="true"/>

</form>

<input type="submit" value="가입하기" id="make_bt" data-inline="true"/>


</center>

</div>
</article>


</div>
</body>



</html>